package com.qfedu.tantu.controller;

import com.qfedu.tantu.dto.HousPayDto;
import com.qfedu.tantu.dto.ReserveDto;
import com.qfedu.tantu.entity.Reserve;
import com.qfedu.tantu.service.intf.HousPayService;
import com.qfedu.tantu.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
/**
 * @Description:
 * @Author: 赵金帅
 * @Date: 2022/07/02/0:26
 */
@RestController
@CrossOrigin
@Api
@RequestMapping("/api/houspay/")
public class HousPayController {
    @Resource
    private HousPayService service;
    //创建支付
    @PostMapping("createpay.do")
    public R create(@RequestBody ReserveDto dto){
      return service.create(dto);
    }
    //查询支付状态
    @GetMapping("query.do")
    public R query(int token,String idnum){
        return service.query(token,idnum);
    }
    //发起退款
    @GetMapping("refund.do")
    public R refund(int token,String idnum){
        return service.refund(token,idnum);
    }
}
